package com.maixin.code.service;

import java.util.List;

import com.maixin.code.dao.BaseDAO;
import com.maixin.code.dao.DAO;
import com.maixin.code.dao.UsersDAO;
import com.maixin.code.entity.UserLogin;
import com.maixin.code.entity.Users;

public class UsersService {
	private UsersDAO usersDAO;
	
	private DAO<Users> baseDao;
	
	/**
	 *  根据条件查询数据
	 * @param propertyNames
	 * @param values
	 * @return
	 */
	public List<Users> findByProperties(String[] propertyNames, Object[] values){
		return ((BaseDAO<Users>) baseDao).findByProperties(propertyNames, values,Users.class);
	}
	
	

	public UsersDAO getUsersDAO() {
		return usersDAO;
	}

	public void setUsersDAO(UsersDAO usersDAO) {
		this.usersDAO = usersDAO;
	}

	public DAO<Users> getBaseDao() {
		return baseDao;
	}

	public void setBaseDao(DAO<Users> baseDao) {
		this.baseDao = baseDao;
	}
}
